/*
 * Wazuh Vulnerability Scanner - Unit Tests
 * Copyright (C) 2015, Wazuh Inc.
 * September 21, 2023.
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License (version 2) as published by the FSF - Free Software
 * Foundation.
 */

#ifndef _EVENT_DECODER_TEST_HPP
#define _EVENT_DECODER_TEST_HPP

#include "rocksDBWrapper.hpp"
#include "gtest/gtest.h"

auto constexpr TEMP_FEED_DB {"feed_temp"};

/**
 * @brief Runs unit tests for EventDecoder.
 *
 */
class EventDecoderTest : public ::testing::Test
{
protected:
    // LCOV_EXCL_START
    EventDecoderTest() = default;
    ~EventDecoderTest() override = default;
    // LCOV_EXCL_STOP

    /**
     * @brief Set up for every test.
     *
     */
    void SetUp() override
    {
        m_feedDb = std::make_unique<Utils::RocksDBWrapper>(TEMP_FEED_DB);
    }

    /**
     * @brief Tear down for every test.
     *
     */
    void TearDown() override
    {
        std::remove(TEMP_FEED_DB);
    }

    /**
     * @brief RocksDBWrapper instance for feeds.
     *
     */
    std::unique_ptr<Utils::IRocksDBWrapper> m_feedDb;
};

#endif // _EVENT_DECODER_TEST_HPP
